# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-objgraph
pkgver=3.6.0
pkgrel=1
pkgdesc="Draws Python object reference graphs with graphviz"
url="https://github.com/mgedmin/objgraph"
license=('MIT')
arch=('any')
depends=('python')
makedepends=('python-setuptools')
checkdepends=('graphviz')
source=("objgraph-$pkgver.tar.gz::https://github.com/mgedmin/objgraph/archive/$pkgver.tar.gz")
sha512sums=('a0f1cea41ef17ab5bf7c5ac635c37ecb1ddb624087a520ab50817c8a5cc56762f95dd7a74bb7d59966e2b66cacbb9eabe48614087f0fa6a520265aac85cedfbc')

build() {
  cd objgraph-$pkgver
  python setup.py build
}

check() {
  cd objgraph-$pkgver
  python setup.py test
}

package() {
  cd objgraph-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
